<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en" xmlns:white-space="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js">
        $("#1").click(function(){
            $(this).hide();
        })
    </script>
</head>


<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<body>
    <div align="center">
        <h2 align="center" >研究生院信息更新监控系统</h2>
    </div>
      <div align="left" class="form-group">

          <form action="/search" method="post">
              <input type="text"  width="100px" name="schoolName"/>
              <button class="btn btn-info" type="submit">搜索</button>
           </form>
      </div>
    <div>
        <table class="table table-condensed" align="center" border="1px">
            <tr align="center">
                <td align="center">编号</td>
                <td align="center">学校</td>
                <td align="center">内容</td>
                <td align="center">日期</td>
                <td align="center" width="30">更新</td>
            </tr>
            <c:forEach items="${list}" var="list1">
            <form action="/index/${list1.id}" method="get" enctype="application/x-www-form-urlencoded">
            <tr align="center">

                    <td align="center">
                        <input name="id" type="hidden" value="${list1.id}"/>${list1.id}
                        </td>
                    <td align="center" name="schoolName" >
                        <input name = "schoolName" type="hidden" value="${list1.schoolName}">
                        ${list1.schoolName}
                        </td>
                    <c:set var="id" scope="session" value="${list1.id}"/>
                    <c:if test="${id==22}">
                    <td align="center" name="con"style="background-color:#803a5e">${list1.contents}</td>
                    </c:if>

                    <c:if test="${id!=22}">
                    <td align="center" name="con">${list1.contents}</td>
                    </c:if>

                    <td align="center" name="date">${list1.date}</td>
                    <td align="center" width="100"><button type="submit" class="btn btn-default">更新</button></td>

            </tr>
            </form>
            </c:forEach>
        </table>
        <div align="center">

            <ul class="pagination" align="center">

                <c:forEach items="${numbers}" var="p">

                    <li value="${p.pageNum}" ><a href="/index?pageNum=${p.pageNum}" id = "${p.pageNum}">${p.pageNum}</a></li>

                </c:forEach>

            </ul>
        </div>
    </div>

</body>
</html>